package com.itheima.Controller;

import com.itheima.Service.OrderService;
import com.itheima.common.entity.Result;
import com.itheima.pojo.Member;
import com.itheima.pojo.Order;
import com.itheima.pojo.SubmitOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("order")
public class OrderController {
    @Autowired
    private OrderService orderService;

    // 提交预约表
    @PostMapping("/submitOrder")
    public Result submitOrder(@RequestBody SubmitOrder submitOrder){
        int result=orderService.submitOrder(submitOrder);
        return  new Result(true,"预约成功",result);
    }
}
